package com.iakuil.app.domain.dto;


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.iakuil.app.common.core.annotation.Sensitive;
import com.iakuil.app.common.core.enums.Gender;
import com.iakuil.app.common.core.enums.SensitiveStrategy;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * 用户 数据传输对象
 *
 * @author Kai
 * @date 2024-01-26
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户数据传输对象")
public class UserDto implements Serializable {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "用户账号")
    private String userName;

    @Schema(description = "用户昵称")
    private String nickName;

    @Schema(description = "用户邮箱")
    @Sensitive(strategy = SensitiveStrategy.EMAIL)
    private String email;

    @Schema(description = "手机号码")
    @Sensitive(strategy = SensitiveStrategy.PHONE)
    private String phoneNumber;

    @Schema(description = "性别")
    private Gender gender;

    @Schema(hidden = true)
    @JsonIgnore
    private String password;
}
